<!DOCTYPE html>
<script src="../include.js"></script>
<div contenteditable="true">f<b>o</b>ob<i>a</i>r</div>
<script>
    test(() => {
        const range = document.createRange();
        getSelection().addRange(range);

        const divElm = document.querySelector('div');
        println(`Div contents: "${divElm.innerHTML}"`);

        // Remove all formatting from 'foobar'
        range.setStart(divElm, 0);
        range.setEnd(divElm, 5);
        document.execCommand('removeFormat');
        println(`Div contents: "${divElm.innerHTML}"`);
    });
</script>
